package com.senriot.quickup.repository

import com.senriot.cloud.common.IRepository
import com.senriot.quickup.domain.AdSchedule
import com.senriot.quickup.domain.QAdSchedule
import org.springframework.data.querydsl.binding.QuerydslBinderCustomizer
import org.springframework.data.querydsl.binding.QuerydslBindings

interface AdScheduleRepository : IRepository<AdSchedule, Long>, QuerydslBinderCustomizer<QAdSchedule>
{
    @JvmDefault
    override fun customize(bindings: QuerydslBindings, root: QAdSchedule)
    {
        bindings.bind(root.name).first { path, value -> path.containsIgnoreCase(value) }
        bindings.excluding(root.createdBy, root.createdDate, root.lastModifiedBy, root.lastModifiedDate)
    }
}
